package r21118d1119nw;

public class Stu {
    String name;
    String number;
    @Override
    public boolean equals(Object obj) {
//        return (this == obj);
        Stu stu =(Stu)obj;
        if(this.name.equals(stu.name) && this.number.equals(stu.number)){
            return true;
        }else {
            return false;
        }
    }
    @Override
    public String toString() {
        return getClass().getName() + "@" + Integer.toHexString(hashCode());
    }
    public Stu() {
    }

    public Stu(String name, String number) {
        this.name = name;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
}

